<?php
global $_GPC, $_W;
$GLOBALS['frames'] = $this->getNaveMenu();
                $user=pdo_get('users',array('username'=>$_W['username']));
                $uniacid=pdo_get('users_permission',array('uid'=>$user['uid']));

$pageindex = max(1, intval($_GPC['page']));
$pagesize=10;
$where=' WHERE  a.uniacid=:uniacid and  a.m_id=:m_id ';
$data[':uniacid']=$uniacid['uniacid'];
$data[':m_id']=$_GPC['id'];
$sql="SELECT a.*,b.assistant FROM ".tablename('zh_yjm_moneyinfo'). " a left join ". tablename("zh_yjm_assistant")." b on a.ass_id=b.id ".$where." ORDER BY a.time desc";
	$total=pdo_fetchcolumn("SELECT count(*) FROM ".tablename('zh_yjm_moneyinfo'). " a left join ". tablename("zh_yjm_assistant")." b on a.ass_id=b.id ".$where." ORDER BY a.time desc",$data);

$select_sql =$sql." LIMIT " .($pageindex - 1) * $pagesize.",".$pagesize;
$memsx=pdo_fetchall($select_sql,$data);
$pager = pagination($total, $pageindex, $pagesize);

include $this->template('web/memsx');